package jpb.module.dao.keyvalue;

import jpb.module.dao.keyvalue.mapper.KeyValueMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * Created by haol on 2017/5/5.
 */
@Repository
public class KeyValueDao {
        @Autowired
        private KeyValueMapper mapper;

        private Logger logger = LoggerFactory.getLogger(KeyValueDao.class);

        public Integer getValue(int id){
                try {
                        return mapper.getValue(id);
                }catch (Exception e){
                        logger.error(e.getMessage());
                        return null;
                }
        }
}
